﻿@model IEnumerable<BDSimpleStatus.Models.ServerCheckModel>

@{
    ViewBag.Title = "Checks - ";
}

<h2>Checks</h2>

<p>
    @Html.ActionLink("Create New Check", "Create")
</p>

@foreach (var item in Model) {
    <div class="indexcheckwrap">
        <div class="checkiconswrap">
            <a href="@Url.Action("Edit", "Settings", new {id=item.Id})" class="checkedit" title="Edit">&nbsp; </a>
            <a href="@Url.Action("Delete", "Settings", new {id=item.Id})" class="checkdelete" title="Delete">&nbsp; </a>
        </div>
        <div class="checknameurlwrap">
            <div class="display-field2">
                @Html.DisplayFor(modelItem => item.Name)
            </div>
            <div class="display-field2a">
                <a href="@Html.DisplayFor(modelItem => item.URL)" title="Go to check" target="check">@Html.DisplayFor(modelItem => item.URL)</a>
            </div>
            <div class="dispay-field2a">
                @Html.DisplayFor(modelItem => item.Description)
            </div>
        </div>
        <div class="leftfloat">
             Check Ping: @Html.DisplayFor(modelItem => item.CheckPing)<br />
             Check Http: @Html.DisplayFor(modelItem => item.CheckHttp)
        </div>
        <div class="leftfloat">
            Next Check: @Html.DisplayFor(modelItem => item.NextCheckDate)<br />
            Last Check: @Html.DisplayFor(modelItem => item.LastCheckDate)
        </div>
        <div class="leftfloat">
            Frequency: @Html.DisplayFor(modelItem => item.Frequency)<br />
            Enabled? : @Html.DisplayFor(modelItem => item.IsEnabled)
        </div>
        <br class="clearleft" />
    </div>
}

